Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Shaders

QuickDraw 3D provides routines that you can use to manage shaders.

Q3Shader_GetType

You can use the Q3Shader_GetType function to get the type of a shader object.

TQ3ObjectType Q3Shader_GetType (TQ3ShaderObject shader);
shader
A shader object.

DESCRIPTION

The Q3Shader_GetType function returns, as its function result, the type of the shader object specified by the shader parameter. The types of shader objects currently supported by QuickDraw 3D are defined by these constants:

kQ3ShaderTypeSurface
kQ3ShaderTypeIllumination

If the specified shader object is invalid or is not one of these types, Q3Shader_GetType returns the value kQ3ObjectTypeInvalid .

Q3Shader_Submit

You can use the Q3Shader_Submit function to submit a shader in a view.

TQ3Status Q3Shader_Submit (
                     TQ3ShaderObject shader,
                     TQ3ViewObject view);
shader
A shader.
view
A view.

DESCRIPTION

The Q3Shader_Submit function submits the shader specified by the shader parameter for drawing or writing in the view specified by the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |